package com.hbnu.notification.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 消息通知表对象 yz_notification
 * 
 * @author ruoyi
 * @date 2025-05-28
 */
public class Notification extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 消息id */
    @Excel(name = "消息id")
    private Long id;

    /** 接收用户id */
    @Excel(name = "接收用户id")
    private Long userId;

    /** 通知类型 */
    @Excel(name = "通知类型")
    private String type;

    /** 通知的id */
    @Excel(name = "通知的id")
    private Long sourceId;

    /** 通知的内容 */
    @Excel(name = "通知的内容")
    private String content;

    /** 是否已读 */
    @Excel(name = "是否已读")
    private Integer isRead;

    /** 发生时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "发生时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }

    public void setType(String type) 
    {
        this.type = type;
    }

    public String getType() 
    {
        return type;
    }

    public void setSourceId(Long sourceId) 
    {
        this.sourceId = sourceId;
    }

    public Long getSourceId() 
    {
        return sourceId;
    }

    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }

    public void setIsRead(Integer isRead) 
    {
        this.isRead = isRead;
    }

    public Integer getIsRead() 
    {
        return isRead;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("type", getType())
            .append("sourceId", getSourceId())
            .append("content", getContent())
            .append("isRead", getIsRead())
            .append("createdAt", getCreatedAt())
            .toString();
    }
}
